<template>
  <a-modal
    :footer="this.footer"
    :maskClosable="false"
    :title="this.title"
    :visible="this.visible"
    :width="this.width"
    @cancel="cancel"
    @ok="ok"
  >
    <!-- 模态框内容 -->
    <slot></slot>
  </a-modal>
</template>

<script>
  export default {
    name: "modal",
    props: ['title', 'visible', 'footer', 'width'],
    methods: {
      ok(e) {
        this.$emit("ok", e)
      },
      cancel(e) {
        this.$emit("cancel", e)
      }
    }
  }
</script>

<style scoped>

</style>
